<template>
	<view>
		
		<view class="bg_img">
			<image :src="url+'kf01.png'"   mode="widthFix"></image>
		</view>
		<view class="title">为您竭诚服务</view>
		<!-- <view class="line"></view> -->
		<view class="text" @click="paste">服务热线：{{phone}}<br></view>
<view class="text" @click="paste1">客服微信：{{vx}}<br></view>
		
		<button class="confirm02" style="width: 60%;" open-type="contact" >联系客服</button>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				url:this.Cfg.Setting.img,
				phone:'',
vx:''

			}
		},
		onLoad() {
			let me = this;
					
			
					
			me.Net._get('kfphone',{},(res)=>{
				if(res.code ==1){
					me.phone=res.data.phone
					me.vx=res.data.vx
				  console.log(me.data)
				}
			});	
		},
		methods: {
			paste() {
				var value = this.phone;
				console.log(value)
				uni.setClipboardData({
					data: value
				});
			},
			paste1() {
				var value = this.vx;
				console.log(value)
				uni.setClipboardData({
					data: value
				});
			},
			gotopage(e){
				let url = e.currentTarget.dataset.url;
				uni.navigateTo({
					url:url
				})
			},
			// openPhone(){
			// 			let me = this;
			// 	uni.showModal({
			// 	    title: '客服热线',
			// 	    content:me.phone,
			// 	    success: function (res) {
			// 	        if (res.confirm) {
			// 	            //console.log('用户点击确定');
			// 				uni.makePhoneCall({
			// 				    phoneNumber:me.phone//仅为示例
			// 				});
			// 	        } else if (res.cancel) {
			// 	            //console.log('用户点击取消');
			// 	        }
			// 	    }
			// 	});
			// },

		}
	}
</script>


<style>
	page{
		background-color: #fff;
	}
	.bg_img{
		width: 100%;
		text-align: center;
		margin-top: 50px;
		display: inline-block;
	}
	
	.bg_img image{
		width: 50%;
	}
	
	.title{
		font-size: 20px;
		color: #666;
		text-align: center;
		line-height: 34px;
	}
	
	.line{
		width: 50px;
		height: 2px;
		background-color: #E49B27;
		margin: 0 auto;
	}
	
	.text{
		width: 80%;
		margin: 0 auto;
		font-size: 14px;
		color: #999;
		text-align: center;
		margin-top: 20px;
		line-height: 20px;
	}
	
	
	
	

</style>
